package org.dromara.profiles.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 捐赠者开放问题表
 * 数据库表名：bus_donor_question
 */
@Data
@TableName("bus_donor_question")
public class BusDonorQuestion implements Serializable {

    @TableField("id")
    @NotNull(message = "id不能为空")
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer id;

    @TableField("question")
    @Size(max = 255, message = "提问问题长度不能超过255")
    @Length(max = 255, message = "提问问题长度不能超过255")
    @Schema(description = "提问问题")
    private String question;

    @TableField("answer")
    @Size(max = 255, message = "问题答案长度不能超过255")
    @Length(max = 255, message = "问题答案长度不能超过255")
    @Schema(description = "问题答案")
    private String answer;

    @TableField("create_time")
    @Schema(description = "创建时间")
    private LocalDateTime create_time;

    @TableField("role_type")
    @Schema(description = "角色类型（1=捐卵者 2=捐精者）")
    private Integer role_type;

    @TableField("update_time")
    @Schema(description = "更新时间")
    private LocalDateTime update_time;

    @TableField("donor_id")
    @NotNull(message = "捐赠者ID不能为空")
    @Schema(description = "捐赠者ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long donor_id;

    @TableField("del_flag")
    @Schema(description = "删除标志: 0-存在, 1-删除")
    private Integer del_flag;
}
